package cn.llming.auth.mapper;

import cn.llming.auth.domain.Role;
import cn.llming.auth.query.RoleQuery;
import cn.llming.basic.mapper.BaseMapper;
import cn.llming.dto.MenuDto;
import cn.llming.dto.RolePermissionDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role>{

    //删除角色时，删除对应角色的权限
    void removeRoleId(Long roleId);
    //设置角色权限
    void patchInsertPermission(@Param("roleId") long roleId,@Param("permissionSns") List<String> permissionSns);

    List<String> getPer(Long dto);


    List<String> getRoleIdLoadMenu(Long id);


    void deleteBeforeMenu(Long roleId);


    void saveMenu(@Param("roleId") Long roleId,@Param("menuIds") List<String> menuIds);

    //员工
    void deleteEmpBeforRole(Long roleId);


    void insertNewEmpRole(@Param("roleId")Long roleId, @Param("roleIds") List<String> menuIds);

    List<Long> getEmpBeforeRole(Long id);

}
